#include<iostream>
using namespace std;
int main()
{
	int n;
	while (cin >> n)
	{
		if (n == 0) {
			break;
		}
		float a;
		int ans1 = 0;
		int ans2 = 0;
		for (int i = 0; i < n; i++)
		{
			cin >> a;
			if (a > 0) {
				ans1++;
			}
			if (a == 0) {
				ans2++;
			}
		}
		cout << n - ans1 - ans2 << " " << ans2 << " " << ans1 << endl;
	}
	return 0;
}